/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
 */

#ifndef _NGBE_DEVIDS_H_
#define _NGBE_DEVIDS_H_

/*
 * Vendor ID
 */
#ifndef PCI_VENDOR_ID_WANGXUN
#define PCI_VENDOR_ID_WANGXUN                   0x8088
#endif

/*
 * Device IDs
 */
#define NGBE_DEV_ID_EM_VF			0x0110
#define   NGBE_SUB_DEV_ID_EM_VF			0x0110
#define NGBE_DEV_ID_EM				0x0100
#define   NGBE_SUB_DEV_ID_EM_MVL_RGMII		0x0200
#define   NGBE_SUB_DEV_ID_EM_MVL_MIX		0x0252
#define   NGBE_SUB_DEV_ID_EM_MVL_SFP		0x0403
#define   NGBE_SUB_DEV_ID_EM_RTL_SGMII		0x0410
#define   NGBE_SUB_DEV_ID_EM_YT8521S_SFP	0x0460
#define   NGBE_SUB_DEV_ID_EM_RTL_YT8521S_SFP	0x0461

#define NGBE_DEV_ID_EM_WX1860AL_W		0x0100
#define NGBE_DEV_ID_EM_WX1860AL_W_VF		0x0110
#define NGBE_DEV_ID_EM_WX1860A2			0x0101
#define NGBE_DEV_ID_EM_WX1860A2_VF		0x0111
#define NGBE_DEV_ID_EM_WX1860A2S		0x0102
#define NGBE_DEV_ID_EM_WX1860A2S_VF		0x0112
#define NGBE_DEV_ID_EM_WX1860A4			0x0103
#define NGBE_DEV_ID_EM_WX1860A4_VF		0x0113
#define NGBE_DEV_ID_EM_WX1860A4S		0x0104
#define NGBE_DEV_ID_EM_WX1860A4S_VF		0x0114
#define NGBE_DEV_ID_EM_WX1860AL2		0x0105
#define NGBE_DEV_ID_EM_WX1860AL2_VF		0x0115
#define NGBE_DEV_ID_EM_WX1860AL2S		0x0106
#define NGBE_DEV_ID_EM_WX1860AL2S_VF		0x0116
#define NGBE_DEV_ID_EM_WX1860AL4		0x0107
#define NGBE_DEV_ID_EM_WX1860AL4_VF		0x0117
#define NGBE_DEV_ID_EM_WX1860AL4S		0x0108
#define NGBE_DEV_ID_EM_WX1860AL4S_VF		0x0118
#define NGBE_DEV_ID_EM_WX1860NCSI		0x0109
#define NGBE_DEV_ID_EM_WX1860NCSI_VF		0x0119
#define NGBE_DEV_ID_EM_WX1860A1			0x010A
#define NGBE_DEV_ID_EM_WX1860A1_VF		0x011A
#define NGBE_DEV_ID_EM_WX1860A1L		0x010B
#define NGBE_DEV_ID_EM_WX1860A1L_VF		0x011B
#define   NGBE_SUB_DEV_ID_EM_ZTE5201_RJ45	0x0100
#define   NGBE_SUB_DEV_ID_EM_SF100F_LP		0x0103
#define   NGBE_SUB_DEV_ID_EM_M88E1512_RJ45	0x0200
#define   NGBE_SUB_DEV_ID_EM_SF100HT		0x0102
#define   NGBE_SUB_DEV_ID_EM_SF200T		0x0201
#define   NGBE_SUB_DEV_ID_EM_SF200HT		0x0202
#define   NGBE_SUB_DEV_ID_EM_SF200T_S		0x0210
#define   NGBE_SUB_DEV_ID_EM_SF200HT_S		0x0220
#define   NGBE_SUB_DEV_ID_EM_SF200HXT		0x0230
#define   NGBE_SUB_DEV_ID_EM_SF400T		0x0401
#define   NGBE_SUB_DEV_ID_EM_SF400HT		0x0402
#define   NGBE_SUB_DEV_ID_EM_M88E1512_SFP	0x0403
#define   NGBE_SUB_DEV_ID_EM_SF400T_S		0x0410
#define   NGBE_SUB_DEV_ID_EM_SF400HT_S		0x0420
#define   NGBE_SUB_DEV_ID_EM_SF400HXT		0x0430
#define   NGBE_SUB_DEV_ID_EM_SF400_OCP		0x0440
#define   NGBE_SUB_DEV_ID_EM_SF400_LY		0x0450
#define   NGBE_SUB_DEV_ID_EM_SF400_LY_YT	0x0470

/* Assign excessive id with masks */
#define NGBE_OEM_MASK				0x00FF
#define NGBE_WOL_SUP_MASK			0x4000
#define NGBE_NCSI_SUP_MASK			0x8000

#define NGBE_M88E1512_SFP			0x0003
#define NGBE_OCP_CARD				0x0040
#define NGBE_LY_M88E1512_SFP			0x0050
#define NGBE_M88E1512_RJ45			0x0051
#define NGBE_M88E1512_MIX			0x0052
#define NGBE_YT8521S_SFP			0x0060
#define NGBE_INTERNAL_YT8521S_SFP		0x0061
#define NGBE_YT8521S_SFP_GPIO			0x0062
#define NGBE_INTERNAL_YT8521S_SFP_GPIO		0x0064
#define NGBE_LY_YT8521S_SFP			0x0070
#define NGBE_RGMII_FPGA				0x0080
#define NGBE_WOL_SUP				0x4000
#define NGBE_NCSI_SUP				0x8000

#endif /* _NGBE_DEVIDS_H_ */
